package cn.analysis.project.controller;

import cn.analysis.common.ResultVO;
import cn.analysis.project.service.ICivilCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/** 行政区划 */
@RestController
@RequestMapping(value = "civilcode")
public class CiviCodeController {

    @Autowired
    private ICivilCodeService codeService;

    /** 通过name获取对应的civilcode */
    @RequestMapping(value = "selectCodeByName", method = RequestMethod.GET)
    public ResultVO selectCodeByName(String name) {
        return ResultVO.success(codeService.selectCodeByName(name));
    }
}
